package demo;

public class Image {
    private int[][] bitmap;
    private String name;

    public int[][] getBitmap() {
        return bitmap;
    }

    public void setBitmap(int[][] bitmap) {
        this.bitmap = bitmap;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        int x = 0;
        int y = 0;

        if (bitmap != null)
            x = bitmap.length;
        if (x > 0)
            y = bitmap[0].length;

        return name + " " + x + "x" + y;
    }
}
